home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / unix / lin95aux / relnotes.11 < prev    next >
Encoding:
Text File  |  1992-03-14  |  8.6 KB  |  209 lines

  1.  
  2.         Using Linux v0.11
  3.         Linus Torvalds 08.12.91
  4.  
  5. NOTE: Users of 0.10, please check the "changed" list before using 0.11.
  6.  
  7.         Booting linux
  8.  
  9. Linux-0.11 can easily be booted by getting the 2 files boot.img
  10. and root.img from the linux zip archive, uncompressing them and
  11. writing them out to disks of the same size (ie two 1.44M floppies or two
  12. 1.2M floppies). Writing the disks is done with the "rawrite.exe" program
  13. from dos, or with "dd" from unix. Linux is then booted simply by
  14. inserting the boot diskette in drive A, and rebooting the machine. If
  15. everything goes well, linux will ask you to insert the root-disk after
  16. loading the system. Hopefully linux will then correctly load the shell
  17. executable, and leave you as root on the new system (prompt '# ').
  18.  
  19.         Using it.
  20.  
  21. You can get a complete list of available commands by pressing <tab>
  22. twice: the root-disk contains mostly setup-programs needed to install
  23. the system on a harddisk.  You can test them a bit, reading directories
  24. etc. 
  25.  
  26. In order to install linux on the harddisk, first check out your harddisk
  27. by executing the command "fdisk" - it should show you all the partitions
  28. available.  If you have only 1 AT-harddisk, you should get a
  29. errormessage, just ignore it.  At my system fdisk reports the following:
  30.  
  31. /dev/hd1:  20476 blocks minix
  32. /dev/hd2:  19975 blocks minix
  33. /dev/hd3:   1020 blocks minix
  34. /dev/hd4:    170 blocks active 16-bit DOS (>=32M)
  35. /dev/hd6:  41641 blocks active minix
  36.  
  37. The partition type given (12-bit DOS, minix etc) doesn't really mean
  38. anything, unless it's a "extended partition", in which case you
  39. shouldn't use that partition for anything: linux doesn't yet understand
  40. them. When later using "mkfs" to make a linux file system, it won't
  41. change the output of fdisk, so fdisk may well report "DOS", while in
  42. fact you have made it a linux partition.
  43.  
  44. If fdisk doesn't print out anything but errors, linux is unable to read
  45. your harddisk, and you are f**ked.  Play around with the floppy version,
  46. but you won't be able to do anything real.
  47.  
  48.         Making a filesystem
  49.  
  50. In order to really use linux, you will have to make a filesystem on your
  51. harddisk. This starts by deciding which partition you can use. Look
  52. again at what fdisk reports, and try to figure out which of the
  53. partitions you are using for DOS, OS/2 etc. /dev/hdX where X={1,2,3,4}
  54. always refers to the first harddisk, X={6,7,8,9} always refers to the
  55. second disk. /dev/hd0 and /dev/hd5 are special: they are all of the
  56. drive, and mkfs will refuse to use them for a filesystem.
  57.  
  58. When you are certain you know which device points to which partition,
  59. you make a filesystem on the partition of your choice by writing:
  60.  
  61.     mkfs -c /dev/hdX blocks
  62.  
  63. where "-c" means that you want mkfs to check for errors, "dev/hdX" is
  64. the free partition you intend to use for linux, and "blocks" is the
  65. number of blocks fdisk reports for that particular partition. NOTE! mkfs
  66. will overwrite the partition you selected, so be doubly (or triply) sure
  67. that you don't mind that.
  68.  
  69. Note that when using the "-c" flag, mkfs will read through the entire
  70. partition: this can take some time. If there are read errors, mkfs will
  71. mark the particular block as bad, and continue: linux will also print a
  72. little message "harddisk I/O error". After running mkfs these messages
  73. should never occur again: if they do, your data may be corrupted.
  74.  
  75.         Mounting the filesystem
  76.  
  77. After mkfs has exited, it's time to mount the file-system, and do the
  78. necessary things to make it a root file system. Mount the new filesystem
  79. on /user by writing:
  80.         
  81.         
  82.     cd /
  83.     mkdir user
  84.         mount /dev/hdX /user
  85.  
  86. If you get errors for this, mkfs failed, and there is probably something
  87. seriously wrong.
  88.  
  89. After mounting the device, you want to move all the files on the current
  90. floppy-root to the new fs. This can most easily be done by writing:
  91.  
  92.     cd /user
  93.     for i in bin dev etc usr tmp 
  94.     do
  95.     cp +recursive +verbose /$i $i
  96.     done
  97.     sync
  98.  
  99. which will also tell you what it is doing (/bin/sh -> bin/sh etc).
  100.  
  101. After that, you should have a new filesystem that contains the bare
  102. necessities to start hacking linux. Play around some more, and exit
  103. linux by writing "logout or exit". This should result in
  104.  
  105.     child 4 died with error code 0000
  106.     #
  107.  
  108. Do a couple of syncs (3 is a magic number), and reboot the machine.
  109. ALWAYS remember to sync before rebooting: terrible things happen if you
  110. don't.
  111.  
  112.         Using the harddisk as root
  113.  
  114. Once you have happily made a new root, you will want to boot up with it.
  115. This is done by changing a word at offset 508 in the boot-image. The
  116. word (in 386-order, ie low byte first) tells the system which device to
  117. use as root: it is initially 0, which means that we want to use a floppy
  118. of the same type as the boot-disk (and this is the reason that you may
  119. not use a 360kB boot-disk even though the system fits on one: it has to
  120. be the same type as the root-diskette).
  121.  
  122. In order to use the harddisk as root, this value has to be changed to
  123. point to the correct device. Harddisks have a major number of 3 under
  124. linux, and the minor nr is the same as the number X in /dev/hdX. The
  125. complete device number is then calculated with
  126.  
  127.     DEV_NO = (major<<8)+minor
  128.  
  129. or alternatively major*256+minor. Thus /dev/hd1 is (3<<8)+1 = 0x301,
  130. /dev/hd6 = 0x0306 etc. Assuming the partition you made into the new root
  131. was /dev/hd2, you will have to write 0x0302 into the boot-image. That
  132. is, you should change the 508th byte in the image to 0x02, and the 509th
  133. byte to 0x03. There is a sample program for this in some of the older
  134. INSTALL-notes, if you don't understand what it's all about.
  135.  
  136.         Ok, I got the root on hd, what now?
  137.  
  138. As you have probably noticed, you cannot get very far with the binaries
  139. found on the original root-diskette. So the first thing you want to do
  140. is to import some new binaries. To do this you need to tell linux what
  141. kind of floppies you have, as that's the easiest way to import things.
  142.  
  143. As with harddisk, floppies have device numbers, but this time major = 2
  144. instead of 3. The minor number is not as easy: it's a composite that
  145. tells which drive (A, B, C or D) and what type of drive (360kB, 1.2M,
  146. 1.44M etc). The formula is 'minor = type*4+nr', where nr is 0-3 for A-D,
  147. and type is 2 for 1.2M disks, and 7 for 1.44M disks. There are other
  148. types, but these should suffice for now.
  149.  
  150. Thus if you have a 1.2M A-drive, and want to call it "floppy0", you have
  151. to tell linux so. This is done with the "mknod" command. mknod takes 4
  152. paramters: the unix name of the device, a "b" or a "c" depending on
  153. whether it's a Block of Character device, and the major and minor
  154. numbers. Thus to make "floppy0" a 1.2M A-drive, you write:
  155.  
  156.     mknod /dev/floppy0 b 2 8
  157.  
  158. b is for Block-device, the 2 is for floppy, and the 8 is 4*2+0, where
  159. the 2 is 1.2M-drive and the 0 is drive A. Likewise to make a "floppy1"
  160. device that is a 1.44M drive in B, you write:
  161.  
  162.     mknod /dev/floppy1 b 2 29
  163.  
  164. where 29 = 4*7 + 1.  There are a couple of standard names, for users
  165. that are used to minix (major, minor in parentheses): /dev/PS0 is a
  166. 1.44M in A (2,28), /dev/PS1 a 1.44M in B (2,29), /dev/at0 is a 1.2M in A
  167. (2,8), /dev/at1 is a 1.2M in B (2,9). Use mknod to make those that fit
  168. your computer.
  169.  
  170. After you have made these special block devices, you can now read a
  171. floppy under linux. The easiest way to import things into linux is by
  172. writing a tar-file to a floppy with rawrite.exe, and then using:
  173.  
  174.     tar xvf /dev/floppy0
  175.  
  176. to untar it under linux. This way you can get the gcc binaries etc
  177. available from the linux-carrying sites.
  178.  
  179.         Changes from 0.10:
  180.  
  181. - /bin/update is no longer automatically executed upon bootup: instead
  182. the file /etc/rc is evaluated by the shell. This file can then start the
  183. update process, mount andy needed filesystems, possibly fsck'ing them
  184. first. A minimal /etc/rc looks like this:
  185.  
  186.     /bin/update &
  187.     > /etc/mtab
  188.     echo " Ok."
  189.  
  190. - init() restarts the shell every time it is exited: logout from the
  191. login shell results in a "child xxx died with error code yyy", a sync
  192. and then a new shell as root.
  193.  
  194. - floppies work a lot better than in 0.10. Even using two floppies at
  195. the same time seems to work out ok. Reading big chunks at a time is also
  196. faster then in 0.10 (I think).
  197.  
  198. - harddisk errors are handled better. Use the "-c" option in mkfs to map
  199. out all errors.
  200.  
  201. - linux accepts most video-cards: harcules, MDA, CGA etc seem to work.
  202.  
  203. - ^G beeps on the console, so command completion under bash etc will
  204. notify of errors.
  205.  
  206. - sticky directories, corrected handling of uid/gid bits, and better
  207. handling of protections when not root. Most of these won't be noticeable
  208. until we get a init/login.
  209.